<header>
  <nav class="navbar navbar-default navbar-fixed-top header-panel" [hidden]="!isLogin()">
    <div class="container-fluid">
      <!-- Brand and toggle get grouped for better mobile display -->

      <div  class="row">
        <div class="col-md-8 col-md-offset-2">
          <div class="navbar-header">
            <a class="navbar-brand" routerLink="/home" routerLinkActive="active">
              <img alt="Brand" src="assets/logo.png" width="100" height="35" style="position: relative; top: -6px;">
            </a>
          </div>

          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">快速链接 <span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a routerLink="/home" routerLinkActive="active">首页</a></li>
                  <li><a [routerLink]="['/explore', { type: 'guess' }]" >实时推荐</a></li>
                  <li><a [routerLink]="['/explore', { type: 'wish' }]" >离线推荐</a></li>
                  <li><a [routerLink]="['/explore', { type: 'hot' }]" >热门推荐</a></li>
                  <li><a [routerLink]="['/explore', { type: 'rate' }]" >评分最多</a></li>
                </ul>
              </li>
            </ul>
            <form class="navbar-form navbar-left">
              <div class="form-group">
                <input type="text" class="form-control" placeholder="Search" style="width:400px" name="query" (keypress)="enterPress($event)" [(ngModel)]="query">
              </div>
              <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search" aria-hidden="true" (click)="search()"></span></button>
            </form>
            <ul class="nav navbar-nav navbar-right">
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-user" aria-hidden="true"></span><span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="#" style="color: #d35113;font-weight: 700;">{{login.user.username}}</a></li>
                  <li role="separator" class="divider"></li>
                  <li><a routerLink="/login" routerLinkActive="active" (click)="logout()">退出登录</a></li>
                </ul>
              </li>
            </ul>
          </div><!-- /.navbar-collapse -->
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </nav>

</header>


<div class="container-fluid content">
  <div  class="row">
    <div class="col-md-8 col-md-offset-2">

      <router-outlet></router-outlet>

    </div>
  </div>
</div>
